/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface WmsPackH extends BasicModel<WmsPackH> {
  code?: string; // 装箱编号
  text?: string; // 条码内容
  cbustype?: string; // 装箱业务类型
  packDate?: string; // 装箱时间
  packBy?: string; // 装箱人
  wmsPackCList?: any[]; // 子表列表
}

export const wmsPackHList = (params?: WmsPackH | any) =>
  defHttp.get<WmsPackH>({ url: adminPath + '/wms/pack/wmsPackH/list', params });

export const wmsPackHListData = (params?: WmsPackH | any) =>
  defHttp.post<Page<WmsPackH>>({ url: adminPath + '/wms/pack/wmsPackH/listData', params });

export const wmsPackHForm = (params?: WmsPackH | any) =>
  defHttp.get<WmsPackH>({ url: adminPath + '/wms/pack/wmsPackH/form', params });

export const wmsPackHSave = (params?: any, data?: WmsPackH | any) =>
  defHttp.postJson<WmsPackH>({ url: adminPath + '/wms/pack/wmsPackH/save', params, data });

export const wmsPackHDelete = (params?: WmsPackH | any) =>
  defHttp.get<WmsPackH>({ url: adminPath + '/wms/pack/wmsPackH/delete', params });
